#include "Texture.h"

#include "Core/GlobalContext.h"

#include "Platform/OpenGL/OpenGLTexture.h"

namespace SE
{
	Ref<Texture> Texture::Create(const String& filePath)
	{
		switch (RenderAPI::GetAPIType())
		{
			default: SE_ASSERT(false, "Unkown render api type!"); return nullptr;
			case RenderAPIType::OpenGL: return CreateRef<OpenGLTexture>(filePath);
		}
	}

	Ref<Texture> Texture::Create(const Ref<TextureBuffer>& textureBuffer)
	{
		switch (RenderAPI::GetAPIType())
		{
			default: SE_ASSERT(false, "Unkown render api type!"); return nullptr;
			case RenderAPIType::OpenGL: return CreateRef<OpenGLTexture>(textureBuffer);
		}
	}
} // !namespace SE